FROM alpine-java:8_server-jre_unlimited

RUN mkdir -p /apps

COPY demo-0.0.1-SNAPSHOT.jar /apps

RUN chmod 777 /apps/demo-0.0.1-SNAPSHOT.jar

ENV JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Duser.timezone=GMT+08 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"

ENV LANG en_US.utf8

CMD ["/bin/sh", "-c", "java -jar $JAVA_OPTS /apps/demo-0.0.1-SNAPSHOT.jar"]

EXPOSE 8080